home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Programming / powerd / lib / warpup.ass < prev    next >
Encoding:
Text File  |  1980-08-19  |  1.9 KB  |  90 lines

  1. _START    move.l    a0,_arg
  2.     clr.b    (-1,a0,d0.w)
  3.     movea.l    $4.w,a6
  4.     move.l    a6,_ExecBase
  5.     lea    (DOSName,pc),a1
  6.     moveq    #37,d0
  7.     jsr    (-552,a6)        ; OpenLibrary()
  8.     move.l    d0,_DOSBase
  9.     beq.s    .FINISH
  10.  
  11.     movea.l    d0,a6
  12.     jsr    (-60,a6)        ; Output()
  13.     move.l    d0,_stdout
  14.     jsr    (-54,a6)        ; Input()
  15.     move.l    d0,_stdin
  16.  
  17.     movea.l    $4.w,a6
  18.     lea    (IntName,pc),a1
  19.     moveq    #37,d0
  20.     jsr    (-552,a6)        ; OpenLibrary()
  21.     move.l    d0,_IntuitionBase
  22.     beq.s    .CLOSEDOS
  23.  
  24.     lea    (GfxName,pc),a1
  25.     moveq    #37,d0
  26.     jsr    (-552,a6)        ; OpenLibrary()
  27.     move.l    d0,_GfxBase
  28.     beq.s    .CLOSEINT
  29.  
  30.     lea    (PPCName,pc),a1
  31.     moveq    #7,d0
  32.     jsr    (-552,a6)        ; OpenLibrary()
  33.     move.l    d0,_PowerPCBase
  34.     beq.s    .CLOSEGFX
  35.     movea.l    d0,a6
  36.  
  37.     lea    (ppcstruct,pc),a0    ; load ppc structure
  38.     xref    _LinkerDB
  39.     lea    _LinkerDB,a4    ; get local data
  40.     move.l    _PowerPCBase,a1    ; get powerpc.library pointer
  41.     move.l    a4,$44(a0)    ; store a4/r2
  42.     jsr    (-30,a6)
  43.     lea    (ppcstruct,pc),a0
  44.     move.l    (20,a0),d2
  45.  
  46.     movea.l    4.w,a6
  47.     movea.l    _PowerPCBase,a1
  48.     jsr    (-414,a6)        ; CloseLibrary()
  49. .CLOSEGFX    movea.l    _GfxBase,a1
  50.     jsr    (-414,a6)        ; CloseLibrary()
  51. .CLOSEINT    movea.l    _IntuitionBase,a1
  52.     jsr    (-414,a6)        ; CloseLibrary()
  53. .CLOSEDOS    movea.l    _DOSBase,a1
  54.     jsr    (-414,a6)        ; CloseLibrary()
  55. .FINISH    move.l    d2,d0
  56.     rts
  57. ****************************************
  58. DOSName    dc.b    'dos.library',0
  59. IntName    dc.b    'intuition.library',0
  60. GfxName    dc.b    'graphics.library',0
  61. PPCName    dc.b    'powerpc.library',0
  62.     cnop    0,4
  63. ****************************************
  64.     xref    _main
  65. ppcstruct    dc.l    _main
  66.     dc.l    0,0,0,0
  67.     dc.l    0,0,0,0,0,0,0,0    ; d0-d7
  68.     dc.l    0,0,0,0,0,0,0    ; a0-a6
  69.     dc.d    0,0,0,0,0,0,0,0    ; fp0-fp7
  70. ****************************************
  71.     xdef    _DOSBase
  72.     xdef    _IntuitionBase
  73.     xdef    _GfxBase
  74.     xdef    _ExecBase
  75.     xdef    _PowerPCBase
  76.     xdef    _arg
  77.     xdef    _stdout
  78.     xdef    _stdin
  79. ****************************************
  80.     section    ".tocd",data
  81.     dcb.b    32,0
  82. _PowerPCBase    dc.l    0
  83. _ExecBase        dc.l    0
  84. _DOSBase        dc.l    0
  85. _IntuitionBase    dc.l    0
  86. _GfxBase        dc.l    0
  87. _arg        dc.l    0
  88. _stdout        dc.l    0
  89. _stdin        dc.l    0
  90.